package homeWork;

public class homeWork13 {
    public static void main (String[] args){
        int num = 1234;
        printNumber(num);
    }
    //按顺序打印一个数字的每一位(例如 1234 打印出 1 2 3 4)    （递归)
    public static void printNumber(int num){
        if (num < 10){
            System.out.print(num + " ");
        }else {
            printNumber(num/10);
            System.out.print(num%10 + " ");
        }

    }
}
